Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SP not showing columns in CR9 to put in detail section

Status
Not open for further replies.

WebGuyToo

Programmer
Aug 18, 2004
124
US
Hi all,

I posted this in another forum by accident. To me it should be in this forum since its about data access.

I have created a stored procedure that I am using as my crystal report datasource in VB6. My SP has one paramater which is where I would have to pass in the table name. This is a temp table that will change every time the code is an for the report. Basically to allow multiple user to view the rpt at the same time.

My problem...
In VB6...I right-click on Designers to add a Crystal Report 9 rpt. Then I choose the Report Expert and select CrossTab. After that I choose my available datasource - which is my SP. After I select it it asked me for a Discrete Value or Set to NULL option. I cant supply a value so I set the null option and said OK. I can see the name of my SP under the Database Fields, but it does not show any of my columns. Can some help me understand whats going on? Here is my SP.

*What I would like to do is see a list of my columns and just place them in the detail section of my report.


Create Procedure PreAuthDenialStatisticRpt

-- @RetVal Int Output

@strTableName VarChar(50) -- tmp + login name + Table

As

-- Error message variables
Declare @ErrorMsg VarChar(300)
Declare @Error Int
Declare @strSQL VarChar(200)


Begin
Set @strSQL = ('Select DrugName, StatusAppoved, StatusDenied, StatusPending, StatusRecon, ' +
'StatusReconApproval, StatusReconDenials, StatusWithdrawn From ' + @strTableName )
Execute (@strSQL)
End

Return


CleanUp:
Return

ErrorCheck:
Select @ErrorMsg = 'The Following Error Occured: ' + Convert(VarChar(20),@@Error) + ' Error Ocurred During... PreAuthDenialStatisticRpt'
RaisError(@ErrorMsg,16, -1)
GoTo CleanUp


Any help would be greatly appreciated. I'm not very familiar with Crystal reports.

here is part of my vb6 code:

strCrystalRptSQL = "EXEC PreAuthDenialStatisticRpt @strTableName = tmp" & strUserName & "Table"

Set rsData = Get_Recordset(strCrystalRptSQL)
Set Rpt.Dataset = rsData
Rpt.ReportName = gsReportName
Rpt.ReportComment = gsReportComment
Rpt.DisplayReport enmDenialStatistics, strTmpTableNam

Thank you, WebGuyToo

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top