|
Hi,
I am working on C# .NET. I have generated a report using crystal report and displayed it on a .aspx page using report viewer. There is a button on the .aspx page which when clicked will print the report. When the orientation of the page in crystal report is set to 'protrait', i am getting the printout of the report. But when orientation is changed to 'Landscape', I am getting a blank printout. For printing the report i am using javascipt. The code i am using is below.
function callPrint()
{
var PrintSTAT='';
PrintSTAT="";
PrintSTAT+="";
PrintSTAT+="";
var winPrint=window.open('','','');
winPrint.document.write(PrintSTAT);
winPrint.document.close();
winPrint.focus();
winPrint.print();
winPrint.close();
return false;
}
Here LinkName is a doc file in which i am exporting the report.
Help me out.
Regards,
Arvind Sharma
|
|
|
|
|
I'm working on a site where I make heavy use of css nesting and its starting to get problemmatic.
Is there a way to define an exact sequence of elements?
Basically I want:
<br />
#ContentArea .Title {}<br />
in
<br />
<div id="ContentArea"><br />
<div class="Title">This is the Area</div><br />
<div class="Content"><br />
<div class="NewsItem"><br />
<div class="Title">Blah blah</div><br />
<div class="Body">Hhere is the body with lots of text.</div><br />
</div><br />
</div><br />
</div><br />
To only apply to the first .Title, because as it is it drops through to the .Title inside .NewsItem.
|
|
|
|
|
One thing you could do is to define a different style for the nested title that specifies different values for all the style attributes set in the other style:
#ContentArea .Title
{
}
#ContentArea .Content .NewsItem .Title
{
}
Or, you could just give a different class name for the nested div.
|
|
|
|
|
Your problem here dear CPian is conceptual rather than technical.
The idea of not using tables for the layout of the advantage of giving conceptual meaning to our the tags and its class names/ids etc...
Once you have 2 classes with the same name in the same page you instanly destroy the idea of conceptual and human underastandable HTML code. I suggest you change your code and use H tags for the titles. H1 for the one and H2 for the other without using any class names.
e.g.
<br />
<br />
#ContentArea H1 {...}<br />
<br />
<br />
#ContentArea .Content .NewsItem H2 {...}<br />
<br />
<br />
#ContentArea .Content .NewsItem P {...}<br />
In addition, I would suggs tyou used a P tag for the news body. e.g.
<br />
<div id="ContentArea"><br />
<H1>This is the Area</H1><br />
<div class="Content"><br />
<div class="NewsItem"><br />
<H2>Blah blah</H2><br />
< P>Hhere is the body with lots of text.</P><br />
</div><br />
</div><br />
</div><br />
|
|
|
|
|
Hi All,
I am trying to encrypt the query string from page to page...so the calling page must encrypt the query string, and the called page must decrypt it...
When I run it without encryption (same code), I have no problems. When I try with the encrypted query string, I get the following message...
Microsoft VBScript runtime error '800a01a8'
Object required: 'objSharedCrypto'
/shared/includes/Crypt.asp, line 52
This is where we are decrypting...
Dim QSColl, strRequestQS<br />
Set QSColl = RequestQS2()<br />
<br />
rptid = QSColl("rptid")<br />
dataid = QSColl("dataid")<br />
If dataid = "" Then dataid = rptid<br />
DataSession = "RPT-" & dataid<br />
strUDBId = Session("VMAccount")
This is the RequestQS2 function I am calling
Function RequestQS2()<br />
Dim objQS, key<br />
Dim objQSDict<br />
Dim strQS ' Set to Request.QueryString.<br />
<br />
strQS = Request.QueryString<br />
If EncryptedQS() Then<br />
Set objQS = DecryptToQS(strQS, Salt())<br />
'Set objQSDict = Server.CreateObject("Scripting.Dictionary")<br />
<br />
'For Each key In objQS<br />
' objQSDict.Add LCase(key), objQS(key)<br />
'Next<br />
Set RequestQS2 = objQS<br />
<br />
Set objQS = Nothing<br />
Set objQSDict = Nothing<br />
Else<br />
Set RequestQS2 = Request.QueryString<br />
End If<br />
End Function
Which in turn calls on the DecryptToQS function below if the query string is indeed encypted
Function DecryptToQS(ByVal Str, ByVal Salt)<br />
If EncryptedStr(Str) Then<br />
' Remove Prefix.<br />
Str = Right(Str, Len(Str) - Len(QSPrefix()))<br />
Set DecryptToQS = objSharedCrypto.DecryptToQueryString(Str, "eFinanceIt", Salt) <br />
Else<br />
DecryptToQS = Str<br />
End If<br />
End Function
this is line 52 in shared/includes/crypt.asp
Set DecryptToQS = objSharedCrypto.DecryptToQueryString(Str, "eFinanceIt", Salt)
on the first line of Crypt.asp there is the following declaration
Dim objSharedCrypto<br />
Set objSharedCrypto = Server.CreateObject("Crypto.QueryString")
So I am not sure what the problem is, I've used the function with other pages, and it works fine...something is happening with this particular page however.
Any ideas or suggestions?
I appreciate the help
Thanks
|
|
|
|
|
I've figured it out....I had an include statement which was already creating the object...I just had to move the include from the bottom of the script to the top
|
|
|
|
|
How to Compare two dates selected from two different date picker or calendar
rahman
|
|
|
|
|
you can compare two dates using java script function builtin Date function.
here is a sample
if (Date.parse(startDate) > Date.parse(endDate))
{
alert("End date must be greater than or equal to the Start date");
return(false);
}
hope this helps
|
|
|
|
|
Hi Im new to asp and I need to automatically create a csv file using the following line of code
"set fs = fso.CreateTextFile(Server.MapPath(variable & ".csv"), true)"
the problem is I need the file name to be a value of a record set field.
Not sure if this can be done or not
jimmyfitz
|
|
|
|
|
Shouldn't be a problem, as long as the recordset field is a valid filename.
Set fs = fso.CreateTextFile(Server.MapPath(recordset("fieldname") & ".csv"), True)
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Why i keep saving a blank data to the database... but my textbox actually contains something
i@@
|
|
|
|
|
Because there is defenatly something wrong with your code...
Try to be more specific in your question! There will be more chances for you to get a proper answer.
Post your code in a readable format and people will be willing to help you!
Jason Kataropoulos
Excellence is not an act, but a habit! Aristotle
|
|
|
|
|
Okay Thx dude
i@@
|
|
|
|
|
hi friends,
i am doing one Event Calendar. my requirement is i need put the event calendar in a user control. i made the all the things and in local,but if i put this in live server it is not working. it just simply displays the calendar, when change the month it is not chaning, and this is happening only in IE, it is working fine in Mozilla Firefox and opera browsers. no server side event is firing, can u help me please.
with regards
krisshnaprabhu
|
|
|
|
|
Here's a question for you all -
I'm working on a commercial web site and I've chosen to go the Ajax way in it's design. All went well, but now I've somewhat hit the deadend when I got to the point where client has a problem advertising the site.
So, what I'm interested in is - in your experience, what are the best practices on advertising an Ajax site and make it appear on a common search engine?
Obviously, the site doesn't have many pages (it's virtually one page in total that can be directly called - default.aspx) and content is exclusively dinamycaly changed. Also, having no links to point to certain URLs, but onclick events, makes extremely hard for any search engine to pick up any other content except the starting page.
The site is not live yet, but having this in mind, for a commercial site, I'm not sure if I should leave it as it is or start splitting pieces of it into iframes or otherwise. Last thing I would want is to make a technically superior site, but that will fail to acheive it's primary objective.
Any taughts?
|
|
|
|
|
Vladimir S. wrote: I've chosen to go the Ajax way in it's design
Why? What requirments and/or specifications did Ajax provide the solution for?
Vladimir S. wrote: technically superior
You mean Ajax is technically superior to something? What? Ajax is just a name they made up to describe something that existed since DHTML. We even implemented it once using a Java Applet. Back then you implemented that technique because you "needed" it. Now that there are libraries, code generators and other mindless developer products for Ajax I have no doubt that the technique will become widely abused.
|
|
|
|
|
Totally agree. We all used that one way or another all these years.
I just wanted to learn about experiences how such site could be made available for search engines.
|
|
|
|
|
Well I have not kept up with potential changes but remember "Web Crawler"? Search engines used to crawl over your site by parsing the anchor elements in the HTML etc. If they still do that you could put a "site map" type link on your home page that provides access to your various content through traditional anchor elements.
|
|
|
|
|
I don't think there's a good answer here. When flash came on the scene big, we saw a lot of sites with a link: "Click here for HTML version" (and still do). That's probably how they get the bots to crawl the site. Also, what about bookmark's? If a user bookmark's your site, they will only be bookmarking the home page, no matter what they happen to be looking at while bookmarking the page. If you ask me, AJAX is only good for secure web application's on intranet's, or maybe a shopping cart, bank account application, etc. AJAX looks cool, but I think the hype will slow quite a bit once the web community catches on to this.
"Half this game is ninety percent mental." - Yogi Berra
If you can read thank a teacher, if you can read in English, thank a Marine.
M y and h don't work so well due to m addiction to caffeine and m in abilit to to set a cup down uprigt.
|
|
|
|
|
dotnethead wrote: Also, what about bookmark's? If a user bookmark's your site, they will only be bookmarking the home page, no matter what they happen to be looking at while bookmarking the page.
I agree it's a problem, but it is fixable.
http://www.contentwithstyle.co.uk/Articles/38/[^]
dotnethead wrote: AJAX looks cool, but I think the hype will slow quite a bit once the web community catches on to this.
I also agree the hype will die down, but it's cutting edge (or being more widely adopted) and I think browsers and the underlyng technology will change to deal with it way better. Just look how far beyond HTML we've already come. AJAX is the next evolutionary step. Granted, web development is a vast wasteland of technologies, by people pushing it to the limits, and it works (some of the time ) Ahhh, wouldn't it be nice to start from scratch....
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I'm in the same quandry, and decided to put links to "normal" pages that show the same content as the ajax stuff (just not as cool) so the creepy crawlers can find them.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Hi there
I'm working whit Visual Studio 2005 developing an ASP.NET 2.0 WebPage
I have a DropDownList Control with 2 options to select. I want to generate a validation message according to the selection made in the DropDownList Control. Any ideas???
THANX ¡¡
|
|
|
|
|
|
When I am trying to use sendmessage to load property page to FireFox browser using the message below ( ,which is successful in IE. )
gives error. Any Alernative for mozilla FireFox.
::SendMessage(m_hWnd, PSM_INSERTPAGE, 0, (LPARAM)&m_EditPage.m_psp);
|| ART OF LIVING ||
|
|
|
|
|
Taking the **** a tad here, but here goes.
We (or I) have developed a thin client front end for editing glorified batch files. There can be anything from 10 - 1000 lines in the file. I am marking up a HTML table server side (various ajaxy type stuff) and serving it to the user, with drop downs, edit boxes etc to control data for each batch.
One thing I am struggling with is giving them the option to change the order of the batch. My first attempt was two imagebuttons next to the sequence number which allowed them to move a line up or down, effectively swapping two lines. Good for small moves, but useless if they want to move a line to the top of the file. I then had a drop down, populated via an ajax called which moved the element 'after' another element picked from the list. But how to generically handle moving to top. Same as 'move before' element - how to get element to the bottom. Also, as the Sequence number column is numberic, the screen all resizes when I change it to a drop down.
Any ideas on a neat, slick DHTML / Ajaxy interface for arranging the order of a lot of items?
Cheers
Regards
Angel
*********************************************
The sooner you fall behind, the longer you have to catch up.
|
|
|
|