Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 4th, 2003, 10:53 PM
jaharul_alam jaharul_alam is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Pune(India)
Posts: 13 jaharul_alam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Passing Parameter to Cyrstal Report from VB Code

I have created a report in Crystal Report which uses two parameter Fields FromDt and ToDt.. I am calling that report from my vb application using a Crystal Control.. I pass the parameter as follows ...

Cry.ParameterFields(0) = "FromDt;" & Format(dtpFrom.Value, "DD/MM/YYYY") & ";False"

Cry.ParameterFields(1) = "ToDt;" & Format(dtpTo.Value, "DD/MM/YYYY") & ";False"

It works fine.. But the problem is while running the report it promts for Parameters even if I am pasing it through code...

Can any one help me... I am waiting for some one to gikve me respose...

Thanks in Advance

Reply With Quote
  #2  
Old December 5th, 2003, 02:56 AM
jennyjane jennyjane is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 1 jennyjane User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
try adding this line to your code after you initialize your report,
assuming rpt is the name of your report

rpt.EnableParameterPrompting = False

hope this helps

Reply With Quote
  #3  
Old December 5th, 2003, 06:15 AM
jaharul_alam jaharul_alam is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Pune(India)
Posts: 13 jaharul_alam User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry ! Jennyjane, Actually as I have mentioned I am using Crystal Report Activex Control so I don't have and report object to try your code........ Give me some thing that is usefull in case of Crystal Contrl

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Passing Parameter to Cyrstal Report from VB Code


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway