Link to home
Start Free TrialLog in
Avatar of nasa
nasa

asked on

Creating a report/table in Visual C++

Hi,

I am writting an application for my boss.... Most of the application is done.  In his review he asked me for a report that has the following characteristics:

Rows of members of our organization, under each member is list of projects they are in charge of or assisting with.  If they are assistanting with it the project name is highlighed, if they are assisted by someone else the project is highlighted.

All of the data to create the report is available via a database I have opened through ODBC.

So the question is -- how do I go about doing this?  Or where can I look for info on this?

BTW:  I would prefer not to spend any additional funds


Nasa
ASKER CERTIFIED SOLUTION
Avatar of ViralPurohit
ViralPurohit

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nasa
nasa

ASKER

Wow,

That is a seriously awesome post -- It helps me solve problems I wasn't trying to solve.  But the problem I am trying to solve may or maynot be able to be solved with one of the above free solutions (I am still looking at the code to determine if they can or can't) -- maybe you would know :}   -- the report I am trying to create would look like what I havep posted below:


 ----------          -----------         ------------
 |  name |        |  name  |        | name |
 -----------        ------------         ---------

prg 1                 prg 3              prg 4
prg 2                 prg 4              prg 5


 ----------          -----------         ------------
 |  name |        |  name  |        | name |
 -----------        ------------         ---------

prg 1                 prg 3              prg 4
prg 2                 prg 4              prg 5


Any ideas how to do this?


Nasa
Avatar of DanRollins
A solution that  ViralPurohit did no mention -- but is much easier to implement --  is to generate an HTML file and load/print it with a webbrowser .  For instance, the example you showed would look like this:

<html><head>
<title>The Table For my Boss, "Mr. Professor" </title>
</head>
<body>
<table border=2 bodercolor=white>
<tr>
    <td bordercolor=red>Name</td>    
    <td bordercolor=red>Name</td>    
    <td bordercolor=red>Name</td>
</tr>
<tr>
    <td bordercolor=white>prg1<br>prg2</td>    
    <td bordercolor=white>prg3<br>prg4</td>    
    <td bordercolor=white>prg4<br>prg5</td>    
</tr>
<tr>
    <td bordercolor=red>Name</td>    
    <td bordercolor=red>Name</td>    
    <td bordercolor=red>Name</td>
</tr>
<tr>
    <td bordercolor=white>prg1<br>prg2</td>    
    <td bordercolor=white>prg3<br>prg4</td>    
    <td bordercolor=white>prg4<br><b>prg5</b></td>    
</tr>
</table>

</body>
</html>
And to make certain item bold, just surround them with <b>...</b> as in the last  prg5 example.

Just select that text, copy it to the clipboard, use Notepad to create a new file named test.htm and paste it in there.  Then double-click that file in the Explorer.

=-=-=-=-=-=-=-=-=--=
Now it's not clear to me if you are having trouble generating the table in general, or if the trouble is in using database functions to learn what data to put in the table and where to put it ... when :)

There is no way anyone here can tell you how to do that becasue we do not know your database schema.

- Dan
Avatar of nasa

ASKER

Ok,

I have selected easyreport to make my reports with.  So far I have been able to use it to create a view, but when I try to print/print preview with it I just get blank pages.  

Basically, each report is created within it's own class, using easyreport.  The actual report is kept in a variable with the Doc class.  What would I need to do with this type of architecture to get this to print?


Nasa